#define _GNU_SOURCE
#include "app_pool.h"
#include <unistd.h>
#include <stdio.h>

void *task_func(void *arg)
{
    printf("task_func  hello world,%d\n",gettid());
    return NULL;
}

int main(int argc, char const *argv[])
{
    //1 初始化线程池
    app_pool_init();

    //2 注册 任务
    app_pool_submit_task(task_func, NULL);
    app_pool_submit_task(task_func, NULL);
    app_pool_submit_task(task_func, NULL);
    app_pool_submit_task(task_func, NULL);

    //3 等
    sleep(1);
    app_pool_destroy();

    return 0;
}
